package VN.EDU.IMIC.DEVELOPER.TRINHCAOSANG.BaiTapObject.Exc1;

import java.util.Scanner;

public class Views {
    public static void main(String[] args) {

        UserData userData = new UserData();
        String user;
        String pass;
        Scanner scanner = new Scanner(System.in);
        System.out.println(" Plz enter username");
        user = scanner.nextLine();
        if (user.equals("")) {
            System.out.println("Try again");
            return;
        }

        System.out.println(" Plz enter your password");
        pass = scanner.nextLine();
        if (pass.equals("")) {
            System.out.println("Your password again");
            return;
        }

        userData.setUserName(user);
        userData.setPassWord(pass);
        LoginControllers controllers = new LoginControllers(userData);

        if (controllers.CheckUserInfo()) {
            System.out.println("Congratulation , Login success !");

        } else {
            System.out.println("Login failed , Please check your User Name and Password .");

        }
    }

}

